//
//  Define.h
//  TailGoodsPass
//
//  Created by 李小朋 on 2017/9/28.
//  Copyright © 2017年 杨旭. All rights reserved.
//

#ifndef Define_h
#define Define_h

#define YXWeakSelf __weak typeof(self) weakSelf = self;
#define YXWeakCell __weak typeof(cell) weakCell = cell;

// 定义字体类型
#define text_TextName [UIFont fontWithName:@"MicrosoftYaHei" size:fontSize]
//屏幕的宽度
#define kScreenWidth [[UIScreen mainScreen] bounds].size.width
//屏幕的高度
#define kScreenHeight [[UIScreen mainScreen] bounds].size.height
// tabBar高度
#define TabBarHeight    49

// narBar高度
#define NarBarHeight    64

// 打印
#if DEBUG

#define NSLog(FORMAT, ...) fprintf(stderr,"[%s:%d行] %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);

#else

#define NSLog(FORMAT, ...) nil

#endif



// App根视图
#define AppRootViewController  [UIApplication sharedApplication].keyWindow.rootViewController

#define IS_IOS_7    floorf([[UIDevice currentDevice].systemVersion floatValue]) ==7.0 ? 1 : 0

#define IS_IOS_10    floorf([[UIDevice currentDevice].systemVersion floatValue]) == 10.0 ? 1 : 0

#define kFont(s) [UIFont systemFontOfSize:(kScreenWidth >= 375 ? s: s-2.0)]
#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )

// 定义全局颜色
#define color_globalColor [UIColor py_colorWithHexString:@"#55BDFF"]

// 定义全局背景色
#define color_backColor [UIColor py_colorWithHexString:@"#f2f2f2"]

// 定义标题颜色
#define color_titleColor [UIColor py_colorWithHexString:@"#333333"]

// 定义副标题颜色
#define color_textOne [UIColor py_colorWithHexString:@"#666666"]

// 定义副标题颜色
#define color_textTwo [UIColor py_colorWithHexString:@"#999999"]

// 定义按钮颜色
#define color_coffee  [UIColor py_colorWithHexString:@"#5F3100"]

// 定义线条颜色
#define color_lineColor [UIColor py_colorWithHexString:@"#dddddd"]

// 定义桃红颜色
#define color_peachColor [UIColor py_colorWithHexString:@"#E4027F"]

// 定义按钮颜色
#define color_blue [UIColor py_colorWithHexString:@"#1767A3"]

//定义颜色
#define kColor(color) [UIColor py_colorWithHexString:STR(color)]
//将其他类型转换成字符串
#define STR(string) [NSString stringWithFormat:@"%@", string]

//请求数据成功
#define SUCCESS [[NSString stringWithFormat:@"%@",[responseObject objectForKey:@"MESSAGE"]] isEqualToString:@"成功"]



#endif /* Define_h */
